using Microsoft.Xna.Framework;
using StardewModdingAPI.Framework.ModLoading.Framework;
using StardewValley;
using StardewValley.Objects;

namespace StardewModdingAPI.Framework.ModLoading.Rewriters.StardewValley_1_6;

/// <summary>Maps Stardew Valley 1.5.6's <see cref="BedFurniture"/> methods to their newer form to avoid breaking older mods.</summary>
/// <remarks>This is public to support SMAPI rewriting and should never be referenced directly by mods. See remarks on <see cref="ReplaceReferencesRewriter"/> for more info.</remarks>
public class BedFurnitureFacade : BedFurniture, IRewriteFacade
{
    /*********
    ** Public methods
    *********/
    public static BedFurniture Constructor(int which, Vector2 tile, int initialRotations)
    {
        return new BedFurniture(which.ToString(), tile, initialRotations);
    }

    public static BedFurniture Constructor(int which, Vector2 tile)
    {
        return new BedFurniture(which.ToString(), tile);
    }

    public bool CanModifyBed(GameLocation location, Farmer who)
    {
        return base.CanModifyBed(who);
    }

    public bool IsBeingSleptIn(GameLocation location)
    {
        return base.IsBeingSleptIn();
    }


    /*********
    ** Private methods
    *********/
    private BedFurnitureFacade()
    {
        RewriteHelper.ThrowFakeConstructorCalled();
    }
}
